package com.tsugun.mediaplayer.model.entity

/**
 * 歌单模型
 * 编号 id
 * 标题 title
 * 歌曲id集合 List<String> musicIdList
 * 封面图地址 imageUrl
 * 创建日期 createDate
 * 修改日期 updateDate
 * 作者ID authorId
 * 是否原创 original
 * Created by shize on 2017/4/27.
</String> */

class SheetModel : Comparable<SheetModel> {

    var id: String? = null
    var title: String? = null
    var musicIdList: List<String>? = null
    var imageUrl: String? = null
    var createDate: String? = null
    var updateDate: String? = null
    var authorId: String? = null
    var original: Boolean = false

    constructor() {}

    constructor(title: String?, musics: List<String>?, createDate: String?, updateDate: String?,
                authorId: String?, original: Boolean) {
        this.title = title
        this.musicIdList = musics
        this.createDate = createDate
        this.updateDate = updateDate
        this.authorId = authorId
        this.original = original
    }

    constructor(id: String?, title: String?, musicIdList: List<String>?, imageUrl: String?,
                createDate: String?, updateDate: String?, authorId: String?, original: Boolean) {
        this.id = id
        this.title = title
        this.musicIdList = musicIdList
        this.imageUrl = imageUrl
        this.createDate = createDate
        this.updateDate = updateDate
        this.authorId = authorId
        this.original = original
    }

    override fun compareTo(other: SheetModel): Int {
        // 用于排序
        return title!!.hashCode()
    }
}
